﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DatabaseAccess;
using System.Data;
using System.Text;

namespace Liguo.Administration
{
    public partial class ModifyOrder : System.Web.UI.Page
    {
        private SqlIt modSql = new SqlIt();
        private String constraint;
        
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        protected void ButtonModify_Click(object sender, EventArgs e)
        {            
            Dictionary<String, String> dic = new Dictionary<String, String>();
            if (!TextGoodsID.Text.Trim().Equals(""))
                dic["GoodsID"] = TextGoodsID.Text.Trim();
            if (!TextAmount.Text.Trim().Equals(""))
                dic["Amount"] = TextAmount.Text.Trim();
            if (!TextWeight.Text.Trim().Equals(""))
                dic["Weight"] = TextWeight.Text.Trim();
            if (!TextPrice.Text.Trim().Equals(""))
                dic["Price"] = TextPrice.Text.Trim();
            constraint = "ID=" + TextID.Text.Trim();
            modSql.UpdateMess("OrderDetail", dic, constraint);
            Response.Write("<script>alert('修改成功！')</script>");
            TextID.Text = "";
            TextGoodsID.Text="";
            TextAmount.Text = "";
            TextWeight.Text = "";
            TextPrice.Text = "";
        }
    }
}